<template>
  <div class="about">
    <h1>This is an about page</h1>
    <el-button type="text" @click="open">点击打开 Message Box</el-button>
  </div>
</template>
<script>
export default {
  mounted() {

    this.$confirm("此操作将永久删除该文件，是否继续","提示",{
      confirmButtonText:"确定",
      cancelButtonText:"取消",
      type:"warning"
    }).then(()=>{
      this.$message({
        message:"删除成功",
        type:"success",
      })
    }).catch(()=>{
      this.$message({
        message:"已取消删除",
        type:"info",
      })
    });
    /* this.$message({
      message:"登陆成功",
      type:"success", //success,error,info,warning
      duration:1500
    }) */
  },
  methods: {
      open() {
        this.$alert('这是一段内容', '标题名称', {
          confirmButtonText: '确定',
          callback: action => {
            this.$message({
              type: 'info',
              message: `action: ${ action }`
            });
          }
        });
      }
    }
}
</script>
